<template>
  <div class="thecontainer">
    <div class="container">
      <span style="font-size: 20px; font-weight: 800">
        {{ title }}
      </span>
      <Form ref="formInline" :model="formInline" inline v-if="hiddenForm">
        <FormItem>
          <i-input
            type="text"
            v-model="formInline.user"
            placeholder="请输入名字"
          >
          </i-input>
        </FormItem>
        <FormItem>
          <Button type="primary" @click="handleSubmit">查询</Button>
        </FormItem>
      </Form>
      <slot name="headerRight"></slot>
    </div>
    <slot></slot>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "标题",
    },
    hiddenForm: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      formInline: {
        user: "",
      },
    };
  },
  methods: {
    handleSubmit() {
      console.log(111);
    },
  },
};
</script>

<style lang='scss'>
.thecontainer {
  .container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
  }
}
</style>
